jconed.toolbar.register_handler ( 'FontFamily', function ( editor )
{
	var options = [];
	options.push ( { label: 'Arial', value: 'Arial' } );
	options.push ( { label: 'Tahoma', value: 'Tahoma' } );
	options.push ( { label: 'Courier', value: 'Courier' } );

	var f = new liwe.form.instance ( 'jconed-font', 'no-action' );
	f.select ( { name: 'family', options: options } );
	f.submit ( 'Update' );
	f.events [ 'submit' ] = function ()
	{
		var family = f.get_value ( 'family' );
		jconed.execute ( 'fontName', family );
		return false;
	};
	jconed.toolbar.set_context ( f.get () );
} );

jconed.toolbar.register_handler ( 'FontSize', function ( editor )
{
	var options = [];
	for ( var i = 1; i <= 7; i++ )
		options.push ( { label: i, value: i } );

	var f = new liwe.form.instance ( 'jconed-font', 'no-action' );
	f.select ( { name: 'size', options: options } );
	f.submit ( 'Update' );
	f.events [ 'submit' ] = function ()
	{
		var size = f.get_value ( 'size' );
		jconed.execute ( 'fontSize', size );
		return false;
	};
	jconed.toolbar.set_context ( f.get () );
} );
